package  com.rrs.cost.equipment.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import  com.rrs.cost.equipment.CostEquipment;
import  com.rrs.cost.equipment.dao.ICostEquipmentDao;
import org.rk.core.pub.base.service.ModelService;


@Service("CostEquipmentService")
public class CostEquipmentService extends ModelService<CostEquipment> implements ICostEquipmentService{

	private ICostEquipmentDao modelDao;
	@Resource(name="CostEquipmentDao")
	public void setCostEquipmentDao(ICostEquipmentDao modelDao) {
		super.setDbDao(modelDao);
		this.modelDao=modelDao;
	}
	@Override
	@Transactional
	public boolean deleteById(Long id){
		return modelDao.deleteById(id);
	}
	
	@Override
	public List<CostEquipment> selectListByEquType(String equType,String regionCode){
		Map<String, Object> param = new HashMap<String, Object>();
		param.put("equType", equType);
		param.put("regionCode", regionCode);
		return selectModelList(param);
		
	}
}
